using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Mgh.Data.Sql;
using Jewelry.BussinessLayer;
using Jewelry.Entities;
using System.Collections.Generic;
using System.Globalization;

public partial class Pages_AManageShipment : Mgh.UI.Sql.PageBase
{
    #region properties
    protected CultureInfo myInfo;
    private ShipmentBLL bn;

    #endregion

    #region events

    override protected void Page_Load(object sender, EventArgs e)
    {
        base.Page_Load(sender, e);
        myInfo = CultureInfo.InvariantCulture;
        if (!IsPostBack)
        {
            txtEnd.Text = txtStart.Text = System.DateTime.Now.ToShortDateString();
        }
    }

    protected void odsCreating(object sender, ObjectDataSourceEventArgs e)
    {
        bn = new ShipmentBLL(getCurrentConnect());
        e.ObjectInstance = bn;
    }

    protected void odsSelecting(object sender, ObjectDataSourceSelectingEventArgs e)
    {
        e.InputParameters["start"] = DateTime.Parse(txtStart.Text);
        e.InputParameters["end"] = DateTime.Parse(txtEnd.Text);
    }

    protected void odsSelected(object sender, ObjectDataSourceStatusEventArgs e)
    {
        if (e.ReturnValue == null)
        {
            cval.IsValid = false;
            cval.Text = bn.getMessage();
        }
    }

    protected void btFilter_Click(object sender, EventArgs e)
    {
        gv.DataBind();
    }

    #endregion

    #region functions

    #endregion
}
